package com.androidhive.jsonparsing;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ImageView;
import android.widget.Toast;

public class ChatActivity extends Activity{
	ImageView imgFridend, imgmessage, imgchange;
	static WebView wv_main;
	View v;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_chat);
		v = (View) findViewById(R.id.view1);
	//	wv_main = (WebView) findViewById(R.id.wvMain);
//		WebViewClient webViewClient = new WebViewClient();
//		wv_main.setWebViewClient(webViewClient);
//		wv_main.loadUrl("http://m.zing.vn");
		// prevItem.setSticky(true);
		// nextItem.setSticky(true);

		final QuickAction quickAction = new QuickAction(this,
				QuickAction.VERTICAL);
		final QuickActionMessage quickActionMessage = new QuickActionMessage(
				this, QuickActionMessage.VERTICAL);
		final QuickActionChange quickActionChange = new QuickActionChange(this,
				QuickActionChange.VERTICAL);

		quickAction.addActionItem();
		quickActionChange.addActionItem();
		quickActionMessage.addActionItem();
		quickActionChange.addActionItem2();

		imgFridend = (ImageView) findViewById(R.id.imageView2);
		imgmessage = (ImageView) findViewById(R.id.imageView3);
		imgchange = (ImageView) findViewById(R.id.imageView4);


//		imgFridend.setOnClickListener(new OnClickListener() {
//
//			public void onClick(View v) {
//				// TODO Auto-generated method stub
//				quickAction.show(v);
//			}
//		});

//		imgmessage.setOnClickListener(new OnClickListener() {
//
//			public void onClick(View v) {
//				// TODO Auto-generated method stub
//				quickActionMessage.show(v);
//			}
//		});
//
//		imgchange.setOnClickListener(new OnClickListener() {
//
//			public void onClick(View v) {
//				// TODO Auto-generated method stub
//		//		quickActionChange.show(v);
//				Toast.makeText(getBaseContext(), "change", Toast.LENGTH_LONG).show();
//			}
//		});
//
//		quickAction.setOnDismissListener(new QuickAction.OnDismissListener() {
//			public void onDismiss() {
//				// Toast.makeText(getApplicationContext(), "Dismissed",
//				// Toast.LENGTH_SHORT).show();
//				quickAction.dismiss();
//			}
//		});
	}

	public static void callWV(String url) {
		// TODO Auto-generated method stub
		wv_main.loadUrl(url);
	}
//
//	public void onClick(View v) {
//		// TODO Auto-generated method stub
//		if(v==imgFridend)
//		{
//			QuickAction.
//		}
//	}

}
